﻿using System;
using System.Collections.Generic;
using System.Text;
using DotNet.Data.Factory;
using DotNet.Model;
using DotNet.Common;
using System.Data.SqlClient;
using System.Data;
using System.Collections;
namespace DotNet.Data
{
    /// <summary>
    /// 示范写法
    /// 基本方法如下
    /// ***********Exists(int ID)验证存在性根据ID***************
    /// ***********Exists(string name)提供重载根据名称验证******
    /// ***********GetMode(int ID)得到一个实体******************
    /// ***********GetModel(string where)提供重载根据SQL********
    /// **********增(Insert),删(Delete),改(Update)**************
    /// **********GetList(string strWhere)获得数据集(列表)******
    /// **********GetRecordCount(string strWhere)记录总数获得***
    /// </summary>
    public class DALhelp
    {
        IDBHelp db = DBHelp.Create();
   
        public DataTable aa(int pageindex,int pagesize)
        {
            //System.Collections.Hashtable htSyn = System.Collections.Hashtable.Synchronized(new System.Collections.Hashtable());
            //htSyn.Add("aa", 1);
            //htSyn.Add("bb", 2);

            //return db.GetMPageDataTable(pageindex, pagesize, "pid,pname,pgueige", "product", "", "pid", false);
            return null;
        }
        public int bb()
        {
            return db.GetRecordCount("select count(1) from product");
        }
       
    }
   
}
